#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
	double N1, N2, N3, N4;
	cin >> N1 >> N2 >> N3 >> N4;
	double X = (N1 * 2 + N2 * 3 + N3 * 4 + N4 * 1) / (2 + 3 + 4 + 1);
	printf("Media: %.1lf\n", X);
	if (X >= 7.0) printf("Aluno aprovado.\n");
	else if (X < 5.0) printf("Aluno reprovado.\n");
	else
	{
		printf("Aluno em exame.\n");
		double Y;
		cin >> Y;
		printf("Nota do exame: %.1lf\n", Y);
		double Z = (X + Y) / 2;
		if (Z >= 5.0) printf("Aluno aprovado.\n");
		else printf("Aluno reprovado.\n");
		printf("Media final: %.1lf\n", Z);
	}
	return 0;
}